{% extends "base.html" %}

{% load table_row_highlight %}

{% block adds %}

{% endblock %}

{% block content %}
<!--
        <b style="margin: 0 1px;height:1px;background:#fad163;display:block;overflow: hidden"></b>
		<p class="about help_text" style="font-size:12px; font-weight: normal;background:#fad163; margin:0px; padding:4px;">
		
		</p>
		<b style="margin: 0 1px;height:1px;background:#fad163;display:block;overflow: hidden"></b>
-->
	<h1 class="help_header">
	{{message}} We're happy to help you get done the Hottest tasks :)
	</h1>
	
		<div id="tasks">
			<table cellspacing="0" style="table-layout: fixed;">
				<tr id="Menu">
					<th class="caption" width="56" align="center">
						<img src="/appmedia/yes.gif">
					</th>
					<th class="caption">
						Summary
					</th>
					<th class="caption" width="120">
						Add it to my tasks?
					</th>
				</tr>
	
				{% for task in tasks %}
					<tr id="task_{{task.id}}">
						<td class="odd" nowrap width="56" align="center">
							<div style="color:white;margin:1px;padding:1px;background:url('/appmedia/hottask.jpg') no-repeat;">
							{{ task.saved_count }}
							<br>
							added
							</div>
						</td>
						<td class="odd">
							{{task.name}}
						</td>
						<td class="odd" nowrap width="120" align="center">
							<a href="/add_hottask/{{task.id}}/">
							<img src="/appmedia/add.gif"> Yes!
							</a>
						</td>
					</tr>
				{% endfor %}
			</table>
		</div>
	<p>
	<h1 class="help_header">
	Anyone may participate and add Hot tasks here:
	</h1>
	<table cellspacing="0">
	<form action="/hottasks/" method="post" accept-charset="utf-8">
		{{form}}
		<tr>
		<td colspan="2">
			<input type="submit" id="submit" class="submit" value="Add hot task!">
			{% if user.is_authenticated %}
		
			{% else %}
			I want to participate! 
			<a href="/registration/" style="color:blue;">Cool, sign up for free!</a>
			It's simple. All you need to create account - choose your username and password.
			{% endif %}
		</td>
	</tr>
	</form>
	</table>
	
	<script type="text/javascript">
		{% if user.is_authenticated %}
		
		{% else %}
        document.getElementById("submit").disabled = true;
        {% endif %}
    </script>
{% endblock %}
